#pragma once

#include <json/json.h>
#include <QDialog>
#include <QFileDialog>
#include "ui_downloadfiledialog.h"

QT_BEGIN_NAMESPACE
namespace Ui { class DownloadFileDialogClass; };
QT_END_NAMESPACE

enum class DownLoadType {
	CANCEL = 0,
	DOWNLOAD
};

class DownloadFileDialog : public QDialog
{
	Q_OBJECT

public:
	DownloadFileDialog(QWidget *parent = nullptr);
	~DownloadFileDialog();

	void setFileTree(Json::Value& root);
	
	void init();

public slots:
	void onDownloadBtnClick();
	void onCancelBtnClick();
	void onFlushBtnClick();

signals:
	void sigSetDownloadPath(const QString& downloadPath);

	void sigFlushFileTree();

private:
	Ui::DownloadFileDialogClass *ui;

private:
};
